STAGEPASS - WINDOWS + OBS STUDIO INSTALLATION
==============================================

This guide is for a first-time local installation on Windows. StagePass is an
OBS Browser Source, not a program with a setup wizard. Keep the extracted
files on this computer; do not run the HTML file from inside the ZIP.

Already using StagePass? Read UPDATING AN EXISTING INSTALLATION below instead.

YOU WILL NEED
-------------
- OBS Studio installed and a scene to add StagePass to.
- The StagePass ZIP downloaded to your computer.
- Internet access for Twitch chat, profile pictures and update checks.
- Your Twitch channel login, if you want viewers to use chat commands.
  StagePass does not ask for your Twitch password.

1. EXTRACT THE DOWNLOAD
-----------------------
1. Open File Explorer and find the StagePass ZIP, usually in Downloads.
2. Right-click the ZIP and choose Extract All.
3. Choose a location you intend to keep, for example C:\StagePass, and click
   Extract. Do not delete or move the extracted files after adding them to OBS.
4. Open the extracted Stagepass folder. You should see index.html, theme.css,
   stagepass-theme.json, OBS Controls.txt and this guide together. Windows may
   hide the .html, .css, .json or .txt endings.

2. ADD STAGEPASS TO OBS
-----------------------
1. Open OBS Studio. Select the scene where StagePass should appear.
2. In the Sources box, click +, then choose Browser.
3. Select Create new, name it StagePass, and click OK.
4. In the Browser Source properties, tick Local file.
5. Click Browse and select index.html inside the extracted Stagepass folder.
   Select the file itself, not the ZIP or the folder. Click Open.
6. Set Width to 1920 and Height to 1080 as a starting point. If your OBS
   canvas uses a different size, you can use that canvas size instead.
7. Leave Shutdown source when not visible unticked. Also leave Refresh browser
   when scene becomes active unticked, so returning to a scene does not
   intentionally reload the source and start a new chat session.
8. Click OK. StagePass normally stays invisible until a card or popup is shown;
   a blank preview at this point does not necessarily mean it failed.

3. OPEN THE CONTROLS
--------------------
1. In OBS, right-click your StagePass source in Sources and choose Interact.
2. Click inside the Interact window, then press Ctrl+Shift+G together.
3. The controls should appear. Use the tabs across the top and scroll inside
   the panel to see all settings.
4. To close the controls, click X or click outside any text field and press
   Ctrl+Shift+G again. Closing the controls does not remove StagePass.

4. PREVIEW AND POSITION THE CARD
--------------------------------
1. In the controls, open Setup and find Card Position & Size.
2. Click Show layout preview. A sample card appears in the OBS source.
3. Adjust Horizontal offset, Vertical offset and Size until the card fits
   where you want it. The on-stream shop and help follow the same positioning
   and scale. Extreme settings can place them outside the source.
4. Click Hide layout preview when finished. To return to the original
   placement, click Reset position & size.
5. Choose Hanging pass or Portal rise under Card reveal if you want to change
   how the card appears.

5. CONNECT TWITCH CHAT
---------------------
1. In Setup, find Twitch Chat. Enter your channel login, such as mychannel,
   without the twitch.tv address. Use the login, not a display name with
   spaces.
2. Click Connect chat and wait for the connection status to say Connected.
   If it does not, check the login and your internet connection and try again.
3. With OBS running and the StagePass source loaded, send !moshpit in that
   Twitch channel's chat. A card should appear. The default !checkin and !pit
   commands also work. Chat commands can be changed in the Commands tab.
4. A successful check-in records progress. Each chat connection starts a new
   StagePass stream session; reconnecting can allow another check-in. StagePass
   cannot process chat or redemptions while it is not running and connected.

To test without Twitch, open Viewers, replace the example viewer name with a
test name, and click Test Mosh Pit. This creates or changes real local demo
progress for that name. Do not use Reset local demo data on a live installation
unless you intend to clear ALL viewer progress and the order log.

6. OPTIONAL: CHANNEL POINTS CHECK-IN
-------------------------------------
1. In Twitch Creator Dashboard, create a custom Channel Points reward for
   check-ins if your channel has access to custom rewards.
2. Enable Require viewer to enter text for that reward. This is necessary for
   StagePass to receive the redemption through its chat connection.
3. In StagePass Setup, connect chat, find Channel Points Check-In, and click
   Capture next redemption.
4. Have someone redeem the intended reward and enter any text. Avoid other
   text-required redemptions during capture. This test costs points but does
   not check anyone in.
5. Verify the captured reward is the intended one and click Save reward ID.
6. Redeem it again with text to test a real check-in. It shares the same
   per-chat-session limit as the commands.

Points may still be spent if a viewer already checked in, the queue is full,
or StagePass is offline. StagePass cannot refund points or recover missed
redemptions. See OBS Controls.txt for more details.

7. MAKE IT YOURS
----------------
- Setup: change the counter wording, reveal, position and pass portrait.
- Theme Studio: change colours and artwork, preview the design, and optionally
  enable level-based card evolutions. A transparent portrait is needed for a
  clean frame-break outline.
- Achievements: change display names, icons and featured badge weights.
- Shop: manage listings and viewer title approvals.
- Commands: change the chat command names.

The detailed OBS Controls.txt explains these features. Image files referenced
by path must remain in place. Theme export backs up a theme, NOT viewer data.

UPDATING AN EXISTING INSTALLATION
---------------------------------
The update checker only provides a download link; it does not install updates.
Keep the same existing StagePass folder, index.html path and OBS Browser Source.
Do not create a fresh source or move the installation as your update method.

Before updating, close OBS and back up BOTH your existing StagePass folder and
your OBS configuration/browser storage. For a standard Windows installation,
open File Explorer, enter %APPDATA% in its address bar, and copy the entire
obs-studio folder to a safe backup location. Portable OBS installations may
store configuration elsewhere; back up their actual configuration instead.
These backups may contain private information, so do not share them publicly.
If you cannot locate your OBS data, stop and obtain help before updating.

Extract the new ZIP to a temporary folder first. Copy the new StagePass files
over the matching files in your existing StagePass folder, not into a new nested
folder. Keep any personal artwork and other files you use. Replacing index.html
or theme.css overwrites any manual edits made to those files; back them up.
Reopen OBS and check the same source, viewer progress and settings. The files
and OBS browser storage are separate; clearing browser storage can erase data.
Keep your backups until you have verified the update.

TROUBLESHOOTING
---------------
- No controls: open the source's Interact window, click inside it, and press
  Ctrl+Shift+G. Click outside a text field before using the shortcut.
- No card: use Show layout preview. Check that the source is visible in the
  current OBS scene and is not covered by another source. Reset position &
  size if the card is off-screen.
- Nothing happens in chat: check the channel login and Connected status, that
  OBS and the source are running, and that your commands are configured.
- Update check fails: check internet access and try Check again under Setup.
  StagePass can still run locally; updates are not installed automatically.
- Images missing: check that your image paths still point to existing files.

For detailed settings and reward limitations, open OBS Controls.txt.
